package org.linlinjava.litemall.db.service;

import org.linlinjava.litemall.db.dao.LitemallImgMapper;
import org.linlinjava.litemall.db.dao.LitemallTypeMapper;
import org.linlinjava.litemall.db.domain.LitemallImg;
import org.linlinjava.litemall.db.domain.LitemallType;
import org.linlinjava.litemall.db.domain.LitemallTypeExample;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class LitemallImgService {

    @Resource
    private LitemallImgMapper imgMapper;

    public List<LitemallImg> queryByType() {
        List<LitemallImg> types = imgMapper.selectByExample();
        return types;
    }
    public Object create(LitemallImg litemallImg) {
        int i = imgMapper.insertSelective(litemallImg);
        return i;
    }
    public int deleteById(int id){
        return imgMapper.deleteById(id);
    }

}
